﻿
.mud-progress-circular {
    display: inline-block;
    color: var(--mud-palette-text-secondary);

    &.mud-progress-indeterminate {
        animation: mud-progress-circular-keyframes-circular-rotate 1.4s linear infinite;
    }

    &.mud-progress-static {
        transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    }

    &.mud-progress-small {
        height: 24px;
        width: 24px;
    }

    &.mud-progress-medium {
        height: 40px;
        width: 40px;
    }

    &.mud-progress-large {
        height: 56px;
        width: 56px;
    }
}


.mud-progress-circular-svg {
    display: block;
}

.mud-progress-circular-circle {
    stroke: currentColor;

    &.mud-progress-indeterminate {
        animation: mud-progress-circular-keyframes-circular-dash 1.4s ease-in-out infinite;
        stroke-dasharray: 80px, 200px;
        stroke-dashoffset: 0px;
    }

    &.mud-progress-static {
        transition: stroke-dashoffset 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    }
}



@-webkit-keyframes mud-progress-circular-keyframes-circular-rotate {
    0% {
        transform-origin: 50% 50%;
    }

    100% {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes mud-progress-circular-keyframes-circular-dash {
    0% {
        stroke-dasharray: 1px, 200px;
        stroke-dashoffset: 0px;
    }

    50% {
        stroke-dasharray: 100px, 200px;
        stroke-dashoffset: -15px;
    }

    100% {
        stroke-dasharray: 100px, 200px;
        stroke-dashoffset: -125px;
    }
}

.mud-progress-circular-disable-shrink {
    animation: none;
}






.mud-progress-linear {
    height: 4px;
    overflow: hidden;
    position: relative;
}

@each $color in $mud-palette-colors {
    .mud-progress-linear-color-#{$color} {
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            display: block;
            background-color: var(--mud-palette-#{$color});
            opacity: 0.2;
        }
    }
}

.mud-progress-linear-buffer {
    background-color: transparent;
}

.mud-progress-linear-query {
    transform: rotate(180deg);
}

.mud-progress-linear-dashed {
    width: 100%;
    height: 100%;
    position: absolute;
    animation: mud-progress-linear-keyframes-buffer 3s infinite linear;
    margin-top: 0;
}

.mud-progress-linear-dashed-color-primary {
    background-size: 10px 10px;
    background-image: radial-gradient(rgb(195, 189, 244) 0%, rgb(154, 145, 237) 16%, transparent 42%);
    background-position: 0 -23px;
}

.mud-progress-linear-dashed-color-secondary {
    background-size: 10px 10px;
    background-image: radial-gradient(rgb(255, 128, 175) 0%, rgb(255, 77, 143) 16%, transparent 42%);
    background-position: 0 -23px;
}

.mud-progress-linear-bar {
    top: 0;
    left: 0;
    width: 100%;
    bottom: 0;
    position: absolute;
    transition: transform 0.2s linear;
    transform-origin: left;

    &.mud-progress-linear-1-indeterminate {
        width: auto;
        animation: mud-progress-linear-keyframes-indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    }

    &.mud-progress-linear-2-indeterminate {
        width: auto;
        animation: mud-progress-linear-keyframes-indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
    }

    &.mud-progress-linear-bar-1-determinate {
        transition: transform .4s linear;
    }

    &.mud-progress-linear-bar-1-buffer {
        z-index: 1;
        transition: transform .4s linear;
    }

    &.mud-progress-linear-bar-2-buffer {
        transition: transform .4s linear;
    }
}



@-webkit-keyframes mud-progress-linear-keyframes-indeterminate1 {
    0% {
        left: -35%;
        right: 100%;
    }

    60% {
        left: 100%;
        right: -90%;
    }

    100% {
        left: 100%;
        right: -90%;
    }
}

@-webkit-keyframes mud-progress-linear-keyframes-indeterminate2 {
    0% {
        left: -200%;
        right: 100%;
    }

    60% {
        left: 107%;
        right: -8%;
    }

    100% {
        left: 107%;
        right: -8%;
    }
}

@-webkit-keyframes mud-progress-linear-keyframes-buffer {
    0% {
        opacity: 1;
        background-position: 0 -23px;
    }

    50% {
        opacity: 0;
        background-position: 0 -23px;
    }

    100% {
        opacity: 1;
        background-position: -200px -23px;
    }
}
